﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace MuzičkiFeršterker.Translations
{
    [Serializable]
    public class TransFile
    {
        public string language;
        public string filepath;

        public TransFile()
        {
            language = "";
            filepath = "";
        }
        public TransFile(string loc)
        {
            filepath = loc;
            try{
                TransVar t = new TransVar(loc);
                language=t.Language;
                
                }
            catch(Exception e){
                Console.WriteLine(e.ToString());
            }
            
        }
        public string getLanguage()
        {
            return language;
        }
        public string getFilePath()
        {
            return filepath;
        }
        public void setFilePath(string path)
        {
            filepath = path;
            try
            {
                TransVar t = new TransVar(path);
                language = t.Language;

            }
            catch (Exception e)
            {
                Console.WriteLine(e.ToString());
            }           
        }
    }
}
